package com.itheima.day15.work3;


import java.io.*;

import java.net.Socket;


public class ClientDemo {
    public static void main(String[] args) throws IOException {
        Socket  socket=new Socket("127.0.0.1",10004);
        OutputStream outputStream = socket.getOutputStream();
        outputStream.write("TCP测试练习97".getBytes());
        socket.shutdownOutput();
        //接受服务器端反馈
        BufferedReader  br=new BufferedReader(new InputStreamReader(socket.getInputStream()));
        String len;
        while ((len=br.readLine())!=null){
            System.out.println("客户端："+len);
        }
       br.close();
      socket.close();

    }
}
